home *** CD-ROM | disk | FTP | other *** search
- /*
- DemoConversions.h
-
- Application-level format conversions used in MacHack demo
-
- Al Evans
-
- 6/13/97
-
- */
-
-
- #ifndef DEMOCONVERSIONS
- #define DEMOCONVERSIONS
-
- #include "common.h"
-
- struct Point16
- {
- int16 v, h;
- operator const Point () const;
- Point16& operator = ( const Point& p );
- };
-
- assert_anywhere( sizeof (Point16) == 4 );
-
- void SwapIfRequired( Point16* p);
-
- struct Rect16
- {
- int16 top, left, bottom, right;
- operator const Rect () const;
- Rect16& operator = ( const Rect& r );
- };
-
- assert_anywhere( sizeof (Rect16) == 8 );
-
- void SwapIfRequired( Rect16* r);
-
-
- // Format of view layout resource
-
- typedef struct ViewLayout {
- Rect16 viewSize;
- int32 viewCTabID;
- int32 viewBkgID;
- int32 viewBouncerID;
- int32 viewBtnID;
- } ViewLayout;
-
- void SwapIfRequired(ViewLayout* view);
-
- // Format of button description resource
-
- typedef struct ButtonSpec {
- int32 btnPicResNum;
- int32 btnURLResNum;
- Point16 btnTopLeft;
- } ButtonSpec;
-
- void SwapIfRequired(ButtonSpec* button);
-
- #endif
-